{ "cells": [ { "cell_type": "code", "execution_count": 52, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import matplotlib.pyplot as plt\n", "from pandas.plotting import scatter_matrix\n", "import seaborn as sns\n", "from sklearn.model_selection import train_test_split\n", "from sklearn.preprocessing import StandardScaler\n", "from sklearn.metrics import accuracy_score, classification_report\n", "from sklearn.linear_model import LogisticRegression\n", "from sklearn.tree import DecisionTreeClassifier\n", "from sklearn.svm import SVC\n", "from sklearn.neighbors import KNeighborsClassifier\n", "from sklearn.ensemble import RandomForestClassifier\n", "from imblearn.over_sampling import SMOTE\n", "from sklearn.model_selection import GridSearchCV" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Age:The age of the individual, expressed in years\n", "- Gender:The gender of the individual, categorized as male or female.\n", "- Height:The height of the individual, typically measured in centimeters or inches.\n", "- Weight:The weight of the individual, typically measured in kilograms or pounds.\n", "- BMI:A calculated metric derived from the individual's weight and height\n", "- PhysicalActivityLevel: This variable quantifies the individual's level of physical activity\n", "- ObesityCategory: Categorization of individuals based on their BMI into different obesity categories" ] }, { "cell_type": "code", "execution_count": 53, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | Age | \n", "Gender | \n", "Height | \n", "Weight | \n", "BMI | \n", "PhysicalActivityLevel | \n", "ObesityCategory | \n", "
---|---|---|---|---|---|---|---|
0 | \n", "56 | \n", "Male | \n", "173.575262 | \n", "71.982051 | \n", "23.891783 | \n", "4 | \n", "Normal weight | \n", "
1 | \n", "69 | \n", "Male | \n", "164.127306 | \n", "89.959256 | \n", "33.395209 | \n", "2 | \n", "Obese | \n", "
2 | \n", "46 | \n", "Female | \n", "168.072202 | \n", "72.930629 | \n", "25.817737 | \n", "4 | \n", "Overweight | \n", "
3 | \n", "32 | \n", "Male | \n", "168.459633 | \n", "84.886912 | \n", "29.912247 | \n", "3 | \n", "Overweight | \n", "
4 | \n", "60 | \n", "Male | \n", "183.568568 | \n", "69.038945 | \n", "20.487903 | \n", "3 | \n", "Normal weight | \n", "